<template>
	<view class="container">
		<view class="content pad30">
			<block v-for="(item,index) in rows" :key="item.id">
				<navigator :url="'/pages/doctordetail/doctordetail?id='+item.id" hover-class="none">
					<view class="doctor_dl">
						<view class="doctor_dt">
							<image :src="item.avatar" mode="aspectFill"></image>
						</view>
						<view class="doctor_dd">
							<view class="doctor_info">
								<view class="doctor_name">{{item.name}}
								<!-- <text>{{item.jibie}}</text> -->
								</view>
								<view class="doctor_btn">查看详情</view>
							</view>
							<view class="doctor_inner">
								<view class="doctor_lable">{{item.shopname}}</view>
								<view class="doctor_lable"><text class="iconfont icon-fenggetedian"></text>面积</view>
								<view class="doctor_txt">{{item.area}}</view>
							</view>
						</view>
					</view>
				</navigator>
			</block>

		</view>
	</view>
</template>

<script>
	import API from "@/common/api.js";
	export default {
		data() {
			return {
				rows: []
			}
		},
		onLoad() {
			var $this = this
			var shopid = uni.getStorageSync("shopid");
			API.post("doctor/doctorList", {
				isshop: API.isshop,
				shopid: shopid
			}).then((res) => {
				if (res.code == 1) {
					$this.rows = res.data
				}
			})
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.doctor_dl {
		padding: 48rpx 0;
		width: 100%;
		display: flex;
		border-bottom: 2rpx #e8e8e8 dashed;
	}

	.doctor_dt {
		width: 120rpx;
		height: 120rpx;
		border-radius: 120rpx;
		overflow: hidden;
		margin-right: 34rpx;
	}

	.doctor_dt image {
		width: 100%;
		height: 100%;
		border-radius: 120rpx;
	}

	.doctor_dd {
		flex: 1;
	}

	.doctor_info {
		width: 100%;
		overflow: hidden;
		line-height: 52rpx;
	}

	.doctor_name {
		float: left;
		font-size: 36rpx;
		font-weight: bold;
	}

	.doctor_name text {
		font-size: 24rpx;
		font-weight: normal;
		color: #999;
		margin-left: 20rpx;
	}

	.doctor_btn {
		float: right;
		line-height: 52rpx;
		height: 52rpx;
		border-radius: 52rpx;
		padding: 0 30rpx;
		color: #fff;
		font-size: 28rpx;
		background: $color;
	}

	.doctor_inner {
		width: 100%;
		overflow: hidden;
		margin-top: 20rpx;
		display: flex;
		line-height: 44rpx;
	}

	.doctor_lable {
		background: #fff0df;
		color: #f47f00;
		border-radius: 8rpx;
		padding: 0 8rpx;
		margin-right: 16rpx;
		line-height: 40rpx;
		height: 40rpx;
	}

	.doctor_lable text {
		font-size: 24rpx;
		margin: 2rpx 6rpx 0 0;
	}

	.doctor_txt {
		flex: 1;
		color: #666;
		font-size: 28rpx;
		height: 88rpx;
		text-overflow: -o-ellipsis-lastline;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		-webkit-box-orient: vertical;
		white-space: normal !important;
	}
</style>